<?php

define('_INDEX_', 1);

include 'config.inc.php';
include _ITSTOCK_LIB_DIR_.'common.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'html_message.inc.php';

itstock_session_start();

if (itstock_valid_login($_SESSION['user'])) {
    header("Location: main.php");
    exit();
}

header("Content-language: en");
header("Content-type: text/html; charset=utf-8");

?><!DOCTYPE html>
<html>
  <head>
    <title>IT Stock Tool</title>
    <link href="css/bootstrap.min.css" type="text/css" rel="stylesheet">
    <link href="css/index.css" type="text/css" rel="stylesheet">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="favicon.ico">
    <meta charset="utf-8" />
  </head>
  <body>
    <div id="container">
      <div id="header">
        <div class="menu">
          <label>Benson Communications &reg;</label>
        </div>
        <img src="img/logo.png" alt="Benson Communications"></div>
        <div id="page">
          <p><?php
            itstock_html_message();
          ?></p>
          <h3 class="form-signin-heading"><img src="img/login.png" alt="">&nbsp;Warehouse Access</h3>
          <form action="login.php" method="POST">
          <fieldset>
            <img src="img/user.png" alt="">&nbsp;<label>Badge</label><br>
            <input class="form-control" type="text" name="user" placeholder="Badge"><br>
            <img src="img/pass.png" alt="">&nbsp;<label>Password</label><br>
            <input class="form-control" type="password" name="pass" placeholder="Password"><br><br>
            <input class="btn btn-primary" type="submit" value="Sign in">
          </fieldset>
        </form>
      </div>
      <div id="footer">IT Stock Tool - Benson Communications &reg;</div>
    </div>
  </body>
</html>
